home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import flash.display.Loader;
- import flash.display.MovieClip;
- import flash.display.Stage;
- import flash.events.Event;
- import flash.events.IOErrorEvent;
- import flash.events.ProgressEvent;
- import flash.system.Capabilities;
- import flash.system.LoaderContext;
- import flash.utils.ByteArray;
- import flash.utils.Dictionary;
- import flash.utils.getDefinitionByName;
-
- public final class kprotect extends MovieClip
- {
- private var _6:Object = null;
-
- private var _8:Loader = null;
-
- private var _9:int = 1;
-
- private var _66:Dictionary = null;
-
- private var _fl:Array = null;
-
- public function kprotect()
- {
- this.embedded_app = kprotect_embedded_app;
- this.embedded_xml = kprotect_embedded_xml;
- this.embedded_filelist = kprotect_embedded_filelist;
- super();
- stop();
- this._6 = new Object();
- this._66 = new Dictionary();
- this._6.completed = false;
- this._6.embeddic = this._66;
- this._3();
- if(stage)
- {
- this.ats();
- }
- }
-
- private function ats(param1:Event = null) : void
- {
- this._4();
- addEventListener(Event.ENTER_FRAME,this.____);
- loaderInfo.addEventListener(ProgressEvent.PROGRESS,this.___);
- loaderInfo.addEventListener(Event.COMPLETE,this.__);
- loaderInfo.addEventListener(IOErrorEvent.IO_ERROR,this._ioerror);
- }
-
- public function embeddedstartup(param1:Stage, param2:Function) : void
- {
- this._6.embedded = true;
- this._6.stage = param1;
- this._6.cb = param2;
- this.ats();
- }
-
- private function _3() : void
- {
- this._6.bytesLoaded = loaderInfo.bytesLoaded;
- this._6.bytesTotal = loaderInfo.bytesTotal;
- }
-
- private function _4(param1:* = null) : void
- {
- var _loc2_:ByteArray = new this.embedded_app() as ByteArray;
- var _loc3_:ByteArray = new this.embedded_xml() as ByteArray;
- var _loc4_:ByteArray = new this.embedded_filelist() as ByteArray;
- if(_loc4_.length > 4)
- {
- this._6.filelist = _loc4_;
- }
- var _loc5_:ByteArray = this._5(_loc2_);
- this._6.data = _loc2_;
- if(_loc3_.length > 4)
- {
- this._6.xml = _loc3_;
- }
- this._8 = new Loader();
- this._8.contentLoaderInfo.addEventListener(Event.COMPLETE,this._0);
- var _loc6_:LoaderContext = null;
- if(Capabilities.playerType == "Desktop")
- {
- _loc6_ = new LoaderContext();
- _loc6_.allowLoadBytesCodeExecution = true;
- }
- this._8.loadBytes(_loc5_,_loc6_);
- }
-
- private function _0(param1:Event) : void
- {
- var _loc2_:* = this._8.content;
- if(stage != null)
- {
- this._6.stage = stage;
- this._6.root = this;
- }
- _loc2_._1(this._6);
- }
-
- private function _5(param1:ByteArray) : ByteArray
- {
- var _loc3_:int = 0;
- var _loc4_:int = 0;
- var _loc5_:* = 0;
- var _loc8_:* = 0;
- var _loc9_:* = 0;
- var _loc10_:int = 0;
- var _loc2_:ByteArray = param1;
- var _loc6_:ByteArray = null;
- var _loc7_:ByteArray = null;
- _loc3_ = int(_loc2_[4]);
- _loc4_ = 256 + ((int(_loc2_[int(_loc3_)]) ^ _loc3_) & 0x0F | ((int(_loc2_[int(2 + _loc3_)]) ^ _loc3_) >> 2 & 0x3F) << 4 | ((int(_loc2_[int(1 + _loc3_)]) ^ _loc3_) >> 1 & 0x3F) << 10 | ((int(_loc2_[int(3 + _loc3_)]) ^ _loc3_) & 0x3F) << 16);
- _loc5_ = (int(_loc2_[int(4 + _loc3_)]) ^ _loc3_) & 0x0F | ((int(_loc2_[int(6 + _loc3_)]) ^ _loc3_) >> 2 & 0x3F) << 4 | ((int(_loc2_[int(5 + _loc3_)]) ^ _loc3_) >> 1 & 0x3F) << 10 | ((int(_loc2_[int(7 + _loc3_)]) ^ _loc3_) & 0x3F) << 16;
- _loc6_ = new ByteArray();
- _loc6_.length = 256;
- _loc10_ = 0;
- while(_loc10_ < 256)
- {
- _loc6_[_loc10_] = _loc2_[_loc10_];
- _loc10_++;
- }
- _loc7_ = new ByteArray();
- _loc7_.length = _loc5_;
- _loc10_ = 0;
- _loc8_ = 0;
- _loc9_ = 0;
- while(_loc10_ < _loc5_)
- {
- _loc8_ = _loc8_ + 1 & 0xFF;
- _loc9_ = _loc9_ + _loc6_[_loc8_] & 0xFF;
- _loc7_[_loc10_] = _loc2_[int(_loc4_ + _loc10_)] ^ _loc6_[int(_loc6_[_loc8_] + _loc6_[_loc9_] & 0xFF)];
- _loc3_ = int(_loc6_[_loc8_]);
- _loc6_[_loc8_] = _loc6_[_loc9_];
- _loc6_[_loc9_] = _loc3_;
- _loc10_++;
- }
- _loc6_ = null;
- return _loc7_;
- }
-
- private function _ioerror(param1:IOErrorEvent) : void
- {
- this._9 = 999999;
- }
-
- private function ___(param1:ProgressEvent) : void
- {
- this._3();
- }
-
- private function __(param1:Event) : void
- {
- loaderInfo.removeEventListener(ProgressEvent.PROGRESS,this.___);
- loaderInfo.removeEventListener(Event.COMPLETE,this.__);
- this._6.completed = true;
- }
-
- private function ____(param1:Event) : void
- {
- if(this._9 >= framesLoaded)
- {
- if(framesLoaded == totalFrames)
- {
- removeEventListener(Event.ENTER_FRAME,this.____);
- this._6.completed = true;
- }
- return;
- }
- ++this._9;
- this._3();
- nextFrame();
- this._____(this._9 - 2);
- }
-
- private function _____(param1:int) : void
- {
- var _loc4_:ByteArray = null;
- var _loc5_:uint = 0;
- var _loc6_:String = null;
- var _loc7_:uint = 0;
- var _loc8_:uint = 0;
- var _loc9_:uint = 0;
- var _loc10_:ByteArray = null;
- var _loc11_:String = null;
- var _loc12_:Array = null;
- var _loc13_:Function = null;
- var _loc2_:String = String(param1);
- while(_loc2_.length < 6)
- {
- _loc2_ = "0" + _loc2_;
- }
- var _loc3_:Class = Class(getDefinitionByName("kprotectdata_dataset" + _loc2_));
- if(_loc3_)
- {
- _loc4_ = new _loc3_() as ByteArray;
- if(_loc4_.length > 1)
- {
- _loc4_.endian = "littleEndian";
- _loc5_ = uint(_loc4_.readShort());
- _loc6_ = _loc4_.readUTFBytes(_loc5_);
- _loc7_ = _loc4_.readUnsignedInt();
- _loc8_ = _loc4_.readUnsignedInt();
- _loc9_ = _loc4_.readUnsignedInt();
- _loc10_ = new ByteArray();
- _loc4_.readBytes(_loc10_);
- _loc11_ = _loc6_;
- if(this._66[_loc11_] == undefined)
- {
- this._66[_loc11_] = _loc10_;
- }
- else if(this._66[_loc11_] is Function)
- {
- (this._66[_loc11_] as Function)(_loc10_);
- }
- else if(this._66[_loc11_] is Array)
- {
- _loc12_ = this._66[_loc11_];
- this._66[_loc11_] = _loc10_;
- for each(_loc13_ in _loc12_)
- {
- _loc13_(_loc10_);
- }
- }
- }
- _loc4_ = null;
- }
- }
- }
- }
-
-